package todo_app

type EventHandleFunc func(e string, args interface{})
type EventHandler struct {
	ID      string
	Handler EventHandleFunc
}

type IEventBus interface {
	Pub(e string, args interface{})
	Sub(e string, id string, handleFunc EventHandleFunc)
	Unsub(e string, id string)
}

const EventWriteTodoCmd = "todo.write.cmd"
const EventReadTodoCmd = "todo.read.cmd"
const EventReadTodoRet = "todo.read.ret"
const EventLoadTodoCmd = "todo.load.cmd"
